3.73 \(\int (e x)^{-1+n} (a+b \csc (c+d x^n)) \, dx\)

Optimal. Leaf size=45 \[ \frac{a (e x)^n}{e n}-\frac{b x^{-n} (e x)^n \tanh ^{-1}\left (\cos \left (c+d x^n\right )\right )}{d e n} \]

[Out]

(a*(e*x)^n)/(e*n) - (b*(e*x)^n*ArcTanh[Cos[c + d*x^n]])/(d*e*n*x^n)

________________________________________________________________________________________

Rubi [A]  time = 0.0497073, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {14, 4209, 4205, 3770} \[ \frac{a (e x)^n}{e n}-\frac{b x^{-n} (e x)^n \tanh ^{-1}\left (\cos \left (c+d x^n\right )\right )}{d e n} \]

Antiderivative was successfully verified.

[In]

Int[(e*x)^(-1 + n)*(a + b*Csc[c + d*x^n]),x]

[Out]

(a*(e*x)^n)/(e*n) - (b*(e*x)^n*ArcTanh[Cos[c + d*x^n]])/(d*e*n*x^n)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 4209

Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*((e_)*(x_))^(m_.), x_Symbol] :> Dist[(e^IntPart[m]*(e*x
)^FracPart[m])/x^FracPart[m], Int[x^m*(a + b*Csc[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]

Rule 4205

Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Csc[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (e x)^{-1+n} \left (a+b \csc \left (c+d x^n\right )\right ) \, dx &=\int \left (a (e x)^{-1+n}+b (e x)^{-1+n} \csc \left (c+d x^n\right )\right ) \, dx\\ &=\frac{a (e x)^n}{e n}+b \int (e x)^{-1+n} \csc \left (c+d x^n\right ) \, dx\\ &=\frac{a (e x)^n}{e n}+\frac{\left (b x^{-n} (e x)^n\right ) \int x^{-1+n} \csc \left (c+d x^n\right ) \, dx}{e}\\ &=\frac{a (e x)^n}{e n}+\frac{\left (b x^{-n} (e x)^n\right ) \operatorname{Subst}\left (\int \csc (c+d x) \, dx,x,x^n\right )}{e n}\\ &=\frac{a (e x)^n}{e n}-\frac{b x^{-n} (e x)^n \tanh ^{-1}\left (\cos \left (c+d x^n\right )\right )}{d e n}\\ \end{align*}

Mathematica [A]  time = 0.126381, size = 61, normalized size = 1.36 \[ \frac{x^{-n} (e x)^n \left (a \left (c+d x^n\right )+b \log \left (\sin \left (\frac{1}{2} \left (c+d x^n\right )\right )\right )-b \log \left (\cos \left (\frac{1}{2} \left (c+d x^n\right )\right )\right )\right )}{d e n} \]

Antiderivative was successfully verified.

[In]

Integrate[(e*x)^(-1 + n)*(a + b*Csc[c + d*x^n]),x]

[Out]

((e*x)^n*(a*(c + d*x^n) - b*Log[Cos[(c + d*x^n)/2]] + b*Log[Sin[(c + d*x^n)/2]]))/(d*e*n*x^n)

________________________________________________________________________________________

Maple [C]  time = 0.346, size = 158, normalized size = 3.5 \begin{align*}{\frac{ax}{n}{{\rm e}^{{\frac{ \left ( -1+n \right ) \left ( -i\pi \, \left ({\it csgn} \left ( iex \right ) \right ) ^{3}+i\pi \, \left ({\it csgn} \left ( iex \right ) \right ) ^{2}{\it csgn} \left ( ie \right ) +i\pi \, \left ({\it csgn} \left ( iex \right ) \right ) ^{2}{\it csgn} \left ( ix \right ) -i\pi \,{\it csgn} \left ( iex \right ){\it csgn} \left ( ie \right ){\it csgn} \left ( ix \right ) +2\,\ln \left ( e \right ) +2\,\ln \left ( x \right ) \right ) }{2}}}}}-2\,{\frac{b{e}^{n}{\it Artanh} \left ({{\rm e}^{i \left ( c+d{x}^{n} \right ) }} \right ){{\rm e}^{-i/2\pi \,{\it csgn} \left ( iex \right ) \left ( -1+n \right ) \left ({\it csgn} \left ( iex \right ) -{\it csgn} \left ( ix \right ) \right ) \left ({\it csgn} \left ( iex \right ) -{\it csgn} \left ( ie \right ) \right ) }}}{ned}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(-1+n)*(a+b*csc(c+d*x^n)),x)

[Out]

a/n*x*exp(1/2*(-1+n)*(-I*Pi*csgn(I*e*x)^3+I*Pi*csgn(I*e*x)^2*csgn(I*e)+I*Pi*csgn(I*e*x)^2*csgn(I*x)-I*Pi*csgn(
I*e*x)*csgn(I*e)*csgn(I*x)+2*ln(e)+2*ln(x)))-2*b/n*e^n/e/d*arctanh(exp(I*(c+d*x^n)))*exp(-1/2*I*Pi*csgn(I*e*x)
*(-1+n)*(csgn(I*e*x)-csgn(I*x))*(csgn(I*e*x)-csgn(I*e)))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)*(a+b*csc(c+d*x^n)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 0.52141, size = 165, normalized size = 3.67 \begin{align*} \frac{2 \, a d e^{n - 1} x^{n} - b e^{n - 1} \log \left (\frac{1}{2} \, \cos \left (d x^{n} + c\right ) + \frac{1}{2}\right ) + b e^{n - 1} \log \left (-\frac{1}{2} \, \cos \left (d x^{n} + c\right ) + \frac{1}{2}\right )}{2 \, d n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)*(a+b*csc(c+d*x^n)),x, algorithm="fricas")

[Out]

1/2*(2*a*d*e^(n - 1)*x^n - b*e^(n - 1)*log(1/2*cos(d*x^n + c) + 1/2) + b*e^(n - 1)*log(-1/2*cos(d*x^n + c) + 1
/2))/(d*n)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)**(-1+n)*(a+b*csc(c+d*x**n)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \csc \left (d x^{n} + c\right ) + a\right )} \left (e x\right )^{n - 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)*(a+b*csc(c+d*x^n)),x, algorithm="giac")

[Out]

integrate((b*csc(d*x^n + c) + a)*(e*x)^(n - 1), x)